{{ define "exercise.html" }}

<body>
    <div class="container-lg">
        <br>
    <div class="row">
        <div class="col-md">
        <div class="card border-primary">
            <div class="card-header">Exercise</div>
        <div class="card-body table-responsive">
        <table class="table table-borderless">
            <form action="/exercise/" method="post">
                <input name="id" type="hidden" value="{{ .OneEx.ID }}">
                <tr>
                    <td>Group</td>
                    <td><input name="group" type="text" class="form-control" value="{{ .OneEx.Group }}"></td>
                </tr>
                <tr>
                    <td>Place in group</td>
                    <td><input name="place" type="number" class="form-control" value="{{ .OneEx.Place }}"></td>
                </tr>
                <tr>
                    <td>Name</td>
                    <td><input name="name" type="text" class="form-control" value="{{ .OneEx.Name }}"></td>
                </tr>
                <tr>
                    <td>Description</td>
                    <td><textarea name="descr" rows="3" class="form-control" value="{{ .OneEx.Descr }}">{{ .OneEx.Descr }}</textarea></td>
                </tr>
                <tr>
                    <td>Image link</td>
                    <td><input name="image" type="text" class="form-control" value="{{ .OneEx.Image }}"></td>
                </tr>
                <tr>
                    <td>Weight (default)</td>
                    <td><input name="weight" type="number" class="form-control" value="{{ .OneEx.Weight }}"></td>
                </tr>
                <tr>
                    <td>Reps (default)</td>
                    <td><input name="reps" type="number" class="form-control" value="{{ .OneEx.Reps }}"></td>
                </tr>
                <tr>
                    <td><button type="submit" class="btn btn-primary">Save</button></td>
            </form>
            <form action="/exdel/" method="post">
                <input name="id" type="hidden" value="{{ .OneEx.ID }}">
                    <td>
                        <button style="float: right;" type="submit" class="btn btn-danger">Delete</button>
                    </td>
            </form>
                </tr>
        </table>
        </div>
        </div>
        </div>
        <div class="col-md">
            <div class="card border-primary">
                <div class="card-header">Image</div>
                <div class="card-body">
                    <img src="{{ .OneEx.Image }}" style="max-width: 100%;max-height: 100%;"></img>
                </div>
            </div>
        </div>
    </div>
    </div>
        

{{ template "footer.html" }}
{{ end }}